package com.qdu.nic.samyidong.controller;

import com.star.sam.spiclient.SAMSPIClient;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
public class UseraddController {
    @PostMapping("add")
    public String add(@RequestParam("passwd") String password,@RequestParam("phonenumber") String phonenumber,@RequestParam("validcode") String validcode){
        return "OK";
    }

    @GetMapping("test")
    public  String test(){
        SAMSPIClient client = new SAMSPIClient();
        //登录
        client.login("qdu-dx","qdu+dx","10.16.16.1",8443);
        //查询用户
        String test = client.command("queryuser:userid=\"2018204542\";");
        //退出登录
        client.logout();
        return test;
    }

}
